import request from "@/utils/request";

// 获取模板
export const fetchTemplates = params => {
  return request({
    url: "/system/sysArticleModel/list",
    method: "get",
    params
  });
};

// 新增文章内容
export const addArticle = data => {
  return request({
    url: "/system/sysArticle",
    method: "post",
    data
  });
};

// 文章查询
export const fetchArticles = params => {
  return request({
    url: "/system/sysArticle/list",
    method: "get",
    params
  });
};

// 上传图片
export const uploadImage = data => {
  return request({
    url: "/system/ossFile/upload",
    method: "post",
    data
  });
};
